function(http_layer_find_curl)
	if (TARGET http_layer_curl_internal)
		return()
	endif ()

	find_package(CURL)
	if (NOT CURL_FOUND)
		message("find curl from 3rd part path")
		find_package(CURL HINTS ${HTTPLAYER_3RD_OUTDIR}/curl-8.11.1/${CMAKE_BUILD_TYPE} REQUIRED)
		message("curl include dir : ${CURL_LIBRARIES}")
	endif ()

	include(FindPackageHandleStandardArgs)
	find_package_handle_standard_args(CURL DEFAULT_MSG CURL_LIBRARIES CURL_INCLUDE_DIRS)

	add_library(http_layer_curl_internal INTERFACE)
	target_include_directories(http_layer_curl_internal INTERFACE "$<BUILD_INTERFACE:${CURL_INCLUDE_DIRS}>")
	target_link_libraries(http_layer_curl_internal INTERFACE CURL::libcurl CURL::libcurl_static)
endfunction()


